﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WorkSchedueSoft
{
    public partial class TipWin : Form
    {

        Action ok_event;

        Action cancel_event;

        public TipWin()
        {
            InitializeComponent();
            this.ControlBox = false;
        }

        public void MOpen(string contex,Action ok,Action cancel)
        {

            //APPManager.Instance.Main_win.Enabled = false;

            this.ok_event = ok;
            this.cancel_event = cancel;
            this.tiptextBox.Text = contex;
            this.Show();

        }

        private void OnNextButtonClick(object sender, KeyEventArgs e)
        {
            if (this.ok_event != null) this.ok_event();
            Close();
        }

        private void OnCancelClick(object sender, KeyEventArgs e)
        {
            if (this.cancel_event != null) this.cancel_event();
            Close();
        }

    }
}
